<?php 
	$sql = "SELECT `content_id`,`image` FROM `tbl_news` WHERE `status` = '1' ORDER BY `date` DESC";
	$query = mysql_query($sql);
	$tp->Block('list');
	while($result = mysql_fetch_assoc($query)) {
		$content_id	= $result['content_id'];
		$image		= $result['image'] ? '<img src="/contents/news/'.$result['image'].'"  />' : '';
		$tp->Apply();
	}
	mysql_free_result($query);

	$sql = "SELECT  `title`, `detail`  FROM `tbl_news` WHERE `status` = '1' ORDER BY `date` DESC LIMIT 1";
	$query = mysql_query($sql);
	while($result = mysql_fetch_assoc($query)) {
		$detail		= $result['detail'];
		$image		= $result['image'] ? '<img src="/contents/news/'.$result['image'].'"  />' : '';
	}
	mysql_free_result($query);
?>